Skip to content

allow ctx.cancel to be returned in all procs#297

Merged
jackyzha0 merged 2 commits intomainfrom
jackyzha0/allow-upload-cancel
Mar 26, 2025
Merged

allow ctx.cancel to be returned in all procs#297
jackyzha0 merged 2 commits intomainfrom
jackyzha0/allow-upload-cancel

Conversation

@jackyzha0
Copy link
Copy Markdown
Member

Why

we want to be able to cancel a procedure from within a handler (e.g. in the upload case, if the client unexpectedly disconnects, we probably want to just cancel instead of returning some bogus result)

What changed

union the cancel type into all procedure handlers, we don't need to change the client as the client already has cancel in the reader type

Versioning

  • Breaking protocol change
  • Breaking ts/js API change

@jackyzha0 jackyzha0 requested a review from a team as a code owner March 26, 2025 22:26
@jackyzha0 jackyzha0 requested review from masad-frost and zhounathan and removed request for a team March 26, 2025 22:26
@jackyzha0 jackyzha0 merged commit c22bc50 into main Mar 26, 2025
6 checks passed
@jackyzha0 jackyzha0 deleted the jackyzha0/allow-upload-cancel branch March 26, 2025 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants